<template>
  <div>
    <h2>电影列表</h2>
    <button @click="getMovie">点击获取电影列表</button>
    <hr />
    <ul>
      <li v-for="movie in movieList" :key="movie.albumId">
        <h3>{{ movie.albumName }}</h3>
        <p>{{ movie.description }}</p>
      </li>
    </ul>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "Movie",
});
</script>

<script setup lang="ts">
import { storeToRefs } from "pinia";
import useMovieStore from "../store/modules/movie";
const movieStore = useMovieStore();
const { getMovie } = movieStore;
const { movieList } = storeToRefs(movieStore);
</script>

<style  scoped >
</style>